﻿using System;
using System.Web.Routing;

namespace AllNations
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes(RouteTable.Routes);
        }

        public static void RegisterRoutes(RouteCollection routes)
        {
            // homepage
            routes.MapPageRoute("Homepage",
                "Home",
                "~/Default.aspx");

            // homepage
            routes.MapPageRoute("YouthGroupHome",
                "YouthGroup",
                "~/YouthGroupHome.aspx");

            // worship
            routes.MapPageRoute("WorshipHomepage",
                "Worship",
                "~/WorshipHome.aspx");

            routes.MapPageRoute("MissionHomepage",
                "Mission",
                "~/MissionHome.aspx");

            routes.MapPageRoute("EducationHomepage",
                "Education",
                "~/EducationHome.aspx");

            routes.MapPageRoute("MinistryHomepage",
                "Ministries",
                "~/MinistryHome.aspx");

            routes.MapPageRoute("FellowshipHomepage",
                "Fellowship",
                "~/FellowshipHome.aspx");

            routes.MapPageRoute("Login",
                "Login",
                "~/Login.aspx");

            routes.MapPageRoute("FlashVideoPlayer",
                "FlashVideo",
                "~/FlashVideo.aspx");

            routes.MapPageRoute("VideoIntegration",
                "Video/{PageCd}",
                "~/UI/VideoIntegration.aspx");

            routes.MapPageRoute("GenericPage",
                "Page/{PageCd}",
                "~/UI/Page.aspx");

            routes.MapPageRoute("ShoutOut",
                "ShoutOut/{PageCd}",
                "~/UI/ShoutOut.aspx");

            routes.MapPageRoute("Announcements",
                "Announcements/{PageCd}",
                "~/UI/Announcements.aspx");

            routes.MapPageRoute("Events",
                "Event/{PageCd}",
                "~/UI/Events.aspx");

            routes.MapPageRoute("PhotoAlbum",
                "PhotoAlbum/{PageCd}",
                "~/UI/PhotoAlbum.aspx");

            routes.MapPageRoute("FileShare",
                "Fileshare/{PageCd}",
                "~/UI/Fileshare.aspx");

            routes.MapPageRoute("Blogger",
                "Blogger/{PageCd}",
                "~/UI/Blogger.aspx");

            routes.MapPageRoute("MyProfile",
                "MyProfile",
                "~/UserProfile.aspx");

            routes.MapPageRoute("DailyWord",
                "DailyWord/{PageCd}",
                "~/UI/DailyWord.aspx");
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}